#include "widget.h"
#include "ui_widget.h"

#include<QPainter>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}

void Widget::paintEvent(QPaintEvent *event)
{
    (void) event;
    QPainter paint(this);

    paint.drawLine(20,20,200,20);

    QPixmap pixmap(":/lufei.gif");
    paint.rotate(180);
    paint.translate(-800,-600);
    paint.drawPixmap(40,40,500,500,pixmap);
}

